import { h,renderSlots } from "../../lib/guide-mini-vue.esm.js";

export const Foo = {
    setup(){
        return {};
    },
    render(){
        const foo = h("p",{},"foo");

        //Foo .vnode. children
        console.log(this.$slots)

        //1. 获取要渲染的元素
        //2. 获取要渲染的位置
        

        //作用域插槽
        const age = 18;
        // 具名插槽
        return h("div",{},[
            renderSlots(this.$slots,"header",{
                age,
            }),
            foo,
            renderSlots(this.$slots,"footer")]);
    }
}